from flask import Flask
from flask_migrate import Migrate

from config import DevConfig
from db_init import db


def create_flask():
    app = Flask(__name__)
    app.config.from_object(DevConfig)
    migrate = Migrate()
    db.init_app(app=app)
    migrate.init_app(app, db)
    return app
